package com.uam.core.lk.utils.annotation;

import com.uam.core.lk.utils.ErrorInterface;

public enum BaseErrorCode implements ErrorInterface {

    // 基础错误码，五位
    CheckErrorCode(
        10000,
        "请检查错误码是否传递错误"),
    AspectErrorCode(
        10001,
        "请检查LkErrorCodeAspect"),
    TokenNullErrorCode(
            10002,
            "请检查accessToken是否为NULL"),
    ErrorTokenErrorCode(
            10003,
            "accessToken非法"),
    EunmClassErrorCode(
            10004,
            "请检查错误码枚举类是否实现了接口ErrorInterface"),
    SpringExceptionErrorCode(
            10005,
            "服务发生异常,请检查"),
    VerifyCodeError(10006,"验证码错误"),
    ParamCodeError(10007,"参数错误"),
    NOT_SUPPORTED_ERROR_CODE(10008,"请求方式不支持"),
    ;

    private Integer errorCode;
    private String errorMessage;

    private BaseErrorCode(Integer errorCode, String errorMessage) {
        this.errorCode = errorCode;
        this.errorMessage = errorMessage;
    }

    @Override
    public int getErrorCode() {
        return errorCode;
    }

    @Override
    public String getErrorMessage() {
        return errorMessage;
    }

}